--- title: dashboards keywords: fastai sidebar: home_sidebar summary: "Supplies dashboards to investigate datasets and training results. Dashboards are defined as classes, to show the dashboard use the .show() function on an dashboard instance." description: "Supplies dashboards to investigate datasets and training results. Dashboards are defined as classes, to show the dashboard use the .show() function on an dashboard instance." nb_path: "nbs/dashboards.ipynb" ---
pn.extension()
import icedata
test_data_dir = icedata.fridge.load_data()
test_class_map = icedata.fridge.class_map()
test_parser = icedata.fridge.parser(test_data_dir, test_class_map)
test_train_records, test_valid_records = test_parser.parse()
test_record_dataset = RecordDataset(test_valid_records, test_class_map)
test_record_dataset_no_class_map = RecordDataset(test_valid_records)
dso = RecordDatasetOverview(test_record_dataset, height=500)
dso.show()
dso = RecordDatasetOverview(test_record_dataset_no_class_map, height=700, width=500)
dso.show()
mdo = MultiDatasetOverview([test_record_dataset, test_record_dataset_no_class_map], width=800, height=500)
mdo.show()
mdo_empty = MultiDatasetOverview([])
assert mdo_empty.show() is None
dump_var = []
ds_filter = DatasetFilter(test_record_dataset, export_variable=dump_var, width=1000, height=500).show()
# trigger click event to test if record is added to dump_var
ds_filter[-1].clicks += 1
assert len(dump_var) == 1
assert len(dump_var[0]["records"]) == len(test_valid_records)
ds_filter
dump_var = []
dstoes_filter = DatasetFilterThatOnlyExportsStats(test_record_dataset, export_variable=dump_var, height=400).show()
# trigger click event to test if record is added to dump_var
dstoes_filter[-1].clicks += 1
assert len(dump_var) == 1
assert isinstance(dump_var[0], pd.DataFrame)
dstoes_filter
dsc = DatasetCreator(test_record_dataset, test_class_map)
dsc.show()
dsc._datasets.append(1)
create_datasets_overview([test_record_dataset])